import 'package:flutter/material.dart';
import 'package:flutter_component_pay/src/abs_pay_sheet.dart';
import 'package:flutter_component_pay/src/utils/abs_utils.dart';

/* 
 * 支付弹窗样式
 */
class AbsPayTheme {
  /// sheet背景颜色
  static Color get sheetBackgroudColor => AbsPaySheet.instance.sheetBackgroudColor;

  /// 支付标题
  static String get title => AbsPaySheet.instance.title;

  /// 标题样式
  static TextStyle get titleStyle => AbsPaySheet.instance.titleStyle;

  /// 副标题
  static String get subTitle => AbsPaySheet.instance.subTitle;

  /// 副标题样式
  static TextStyle get subTitleStyle => AbsPaySheet.instance.subTitleStyle;

  /// 金额颜色
  static Color get priceColor => AbsPaySheet.instance.priceColor;

  /// sheet 圆角
  static double get borderRadius => AbsPaySheet.instance.borderRadius;

  static TextStyle get payTitleStyle => AbsPaySheet.instance.payTitleStyle;

  /// 点击背景是否消失
  static bool get isDismissible => AbsPaySheet.instance.isDismissible;

  /// 遮罩背景颜色
  static Color get barrierColor => AbsPaySheet.instance.barrierColor;

  /// 总金额小数点后保留位数(默认保留小数点2位)
  static int get asFixed => AbsPaySheet.instance.asFixed < 0 ? 2 : AbsPaySheet.instance.asFixed;

  /// 显示的部件高度
  static double? get height => AbsPaySheet.instance.height;

  /// 底部容器视图的高度
  static double get bottomWidgetHeight => AbsPaySheet.instance.bottomWidgetHeight;

  /// 底部按钮高度
  static double get bottomButtonHeight => AbsPaySheet.instance.bottomButtonHeight;

  /// 底部左侧按钮标题
  static String get bottomLeftTitle => AbsPaySheet.instance.bottomLeftTitle;

  /// 底部右侧按钮标题
  static String get bottomRightTitle => AbsPaySheet.instance.bottomRightTitle;

  /// 底部左侧按钮标题样式
  static TextStyle get bottomLeftTitleStyle => AbsPaySheet.instance.bottomLeftTitleStyle;

  /// 底部右侧按钮标题样式
  static TextStyle get bottomRightTitleStyle => AbsPaySheet.instance.bottomRightTitleStyle;

  /// 底部左侧按钮装饰
  static BoxDecoration get bottomLeftDecoration => AbsPaySheet.instance.bottomLeftDecoration;

  /// 底部右侧按钮装饰
  static BoxDecoration get bottomRightDecoration => AbsPaySheet.instance.bottomRightDecoration;

  /// 默认选择的支付（默认微信支付）
  static AbsPayWay get defaultPayWay => AbsPaySheet.instance.defaultPayWay;

  /// 支付选中图片
  static Image get checkedImage => AbsPaySheet.instance.checkedImage == null
      ? AbsUtils.loadImage(
          'checked',
          size: const Size(24, 24),
        )
      : AbsPaySheet.instance.checkedImage!;

  /// 支付未选中图片
  static Image get uncheckedImage => AbsPaySheet.instance.uncheckedImage == null
      ? AbsUtils.loadImage(
          'unchecked',
          size: const Size(24, 24),
        )
      : AbsPaySheet.instance.uncheckedImage!;
}
